Skip to main content

Setup Guide

Docker Deployment

  1. Clone the repository:
git clone git@github.com:emirage-niallchen/TrackResume.git
  1. Enter a new directory:
cd TrackResume
  1. Create or Editor docker-compose.yml file:
vim docker-compose.yml  # or use any text editor

Note: These steps pull the project and use the docker-compose.yml file. You can also download it manually.

  1. docker-compose.yml file from the project and modify environment variables:
version: '3.8'

services:
app:
image: niallchen/track-resume:latest
container_name: TrackResume
restart: unless-stopped
ports:
- "3000:3000"
environment:
MYSQL_DATABASE_URL: mysql://user:password@ip:port/cv_dev?connection_limit=5&connect_timeout=60&acquire_timeout=60&timeout=60&pool_timeout=60
JWT_SECRET: f14w5er468ergwd486jh31gh3e5t4h863yr431fv165tr4uj86r
NEXTAUTH_URL: http://localhost:3000
NEXTAUTH_SECRET: rwgq5ret6746f4e6ew7t684d6wq464fd6a74tg867
NEXT_TELEMETRY_DISABLED: 1
volumes:
- ./public/uploads:/app/public/uploads
- ./public/project:/app/public/project

Note:

  • Replace MYSQL_DATABASE_URL with your MySQL connection link.

  • Set JWT_SECRET and NEXTAUTH_SECRET to random strings.

  • NEXTAUTH_URL should be set to the base URL for the project such as:

(e.g., https://ip:port or https://your_endpoint.com).
  • The /app/public/uploads and /app/public/project directories store project files and must be mounted to persist data to disk.
  1. Set appropriate permissions:
chmod 775 ./public/uploads ./public/project

注:赋予系统写入路径权限;

  1. Start the container:
docker-compose up -d

Installing from Source

  1. Clone the repository:
git clone <repository-url>
  1. Enter the project directory:
cd TrackResume
  1. Install dependencies:
npm install
  1. Configure the database:
  • Modify .env.example in the root directory to .env and add database connection info
DATABASE_URL="mysql://username:password@ip:port/database"
  1. Initialize the database:
npx prisma db push
  1. Build for production:
npm run build
  1. Start the production server:
npm run start